using System.ComponentModel;
using System.Web.UI;
using System.Web.UI.WebControls;

using AjaxControlToolkit;

using ScottCateAjax2008.Lesson08.Sample1;

[assembly : WebResource( "ScottCateAjax2008.Lesson08.Sample1.DisabledButtonBehavior.js", "text/javascript" )]

namespace ScottCateAjax2008.Lesson08.Sample1
{
    [Designer( typeof( DisabledButtonDesigner ) )]
    [ClientScriptResource( "ScottCateAjax2008.Lesson08.Sample1.DisabledButtonBehavior",
        "ScottCateAjax2008.Lesson08.Sample1.DisabledButtonBehavior.js" )]
    [TargetControlType( typeof( TextBox ) )]
    public class DisabledButtonExtender : ExtenderControlBase
    {
        // TODO: Add your property accessors here.
        //
        [ExtenderControlProperty]
        [DefaultValue( "" )]
        [IDReferenceProperty(typeof(Button))]
        public string TargetButtonID
        {
            get { return GetPropertyValue( "TargetButtonID", "" ); }
            set { SetPropertyValue("TargetButtonID", value ); }
        }

        [ExtenderControlProperty]
        public string DisabledText
        {
            get
            {
                return GetPropertyValue("DisabledText", "");
            }
            set
            {
                SetPropertyValue("DisabledText", value);
            }
        }
    }
}